﻿using Abp.Application.Services.Dto;
using ARchGL.Platform.Electrocar.Core;
using AutoMapper;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace ARchGL.Platform.Electrocar.Application.Dto
{
    /// <summary>
    /// 部门信息 ViewModel
    /// </summary>
    public class DepartmentsDto : EntityDto<Guid>
    {
        /// <summary>
        /// 上级部门
        /// </summary>
        public Guid ParentId { get; set; }
        /// <summary>
        /// 名称
        /// </summary>
        public string Name { get; set; }
        /// <summary>
        /// 级别
        /// </summary>
        public int Level { get; set; }
        /// <summary>
        /// 排序
        /// </summary>
        public int Sort { get; set; }
        /// <summary>
        /// 描述
        /// </summary>
        public string Description { get; set; }
    }

    /// <summary>
    /// 扩展类
    /// </summary>
    public static class DepartmentsDtoExtensions
    {
        public static List<DepartmentsDto> ToDto(this List<Departments> query)
        {
            //return query.Select(x =>
            //{
            //    //var dto = Abp.ObjectMapper.Map<DepartmentsDto>(x);

            //    //return dto;

            //}).ToList();

            return null;
        }
    }
}
